package com.dongbo.recorder.screenrecord.dialog;

import android.content.Context;
import android.widget.TextView;

import com.dongbo.recorder.screenrecord.R;
import com.lxj.xpopup.core.CenterPopupView;

import androidx.annotation.NonNull;

/**
 * @author GuoZi
 * @date :2020/5/5 19:24
 * @description:
 */
public class LoadingPop extends CenterPopupView {
    private TextView loadingProgress;

    public LoadingPop(@NonNull Context context) {
        super(context);
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.pop_loading;
    }

    @Override
    protected void onCreate() {
        super.onCreate();
        loadingProgress = (TextView) findViewById(R.id.loading_progress);
    }

    public void setProgress(int progress) {
        loadingProgress.setText("已完成" + progress + "%");
    }

    public void setProgress(String msg) {
        loadingProgress.setText(msg);
    }
}
